/*
package April._19.work7;

import java.io.File;
import java.io.FileInputStream;
import java.io.FileNotFoundException;
import java.io.IOException;

public class Main {
    public static void main(String[] args) {
        File dir = new File("fileTest\\a.txt");
        findJavaFile(dir);
    }

    private static void findJavaFile(File dir) throws IOException {
        File[] files = dir.listFiles();
        int digitalNum = 0;
        int bytesNum = 0;
        int spaceNum = 0;
        if(files==null){
            System.out.println("dir 不是目录");
        }
        for (File file : files) {
            if(file.isFile()){
                FileInputStream in = new FileInputStream(file);
                int readCount=0;
                byte[] bytes = new byte[1024];
                while((readCount=in.read(bytes))!=-1){
                    for (int i = 0; i < readCount; i++) {
                        if (bytes[i] >= '0' && bytes[i] <= '9') {
                            digitalNum++;
                        } else if ((bytes[i] >= 'a' && bytes[i] <= 'z') ||
                                (bytes[i] >= 'A' && bytes[i] <= 'Z')) {
                            bytesNum++;
                        } else if (bytes[i] == ' ') {
                            spaceNum++;
                        }
                    }
                }
            }else {
                findJavaFile(file);
            }
        }
    }
}
*/
